package com.rainng.coursesystem.manager;

import com.rainng.coursesystem.model.FavouriteItem;
import com.rainng.coursesystem.service.FavouriteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class FavouriteManager {

    @Autowired
    private FavouriteService favouriteService;

    public List<FavouriteItem> listFavourites(String sNumber, String tNumber) {
        return favouriteService.listFavourites(sNumber, tNumber);
    }

    public List<FavouriteItem> listPublicFavourites(String sNumber, String tNumber) {
        return favouriteService.listPublicFavourites(sNumber, tNumber);
    }

    public boolean setFavouriteVisibility(String sNumber, String tNumber, Boolean isPublic) {
        return favouriteService.setFavouriteVisibility(sNumber, tNumber, isPublic);
    }
}